try:
    from tpl_helpers import __rand_questions, __print_category
except ImportError:
    from .tpl_helpers import __rand_questions, __print_category

    
def test_gap_with_alternatives(_a=7):
    x = _a
    if x  > 10:   # alternative could be in C: "or" vs "||" HIDE(x >)~(=x>\=)
        print("big")
    else:      
        print("small")

def test_gap_with_baseword(_a=7):
    x = _a
    if x  > 10:   # HIDE(  if  )
        print("big")
    else:      # HIDE(  else : )~(if 1#bet yra gudresnių variantų)
        print("small")

def test_gap_with_partof_baseword(_a=7):
    x = _a
    if x  > 10:   
        print("big part")
    else:      # HIDE(lse)
        print("small part")        
    
def test_gaps(_a=7):
    x = _a
    print(x)
    x =  11 + x  # HIDE(x) HIDE(11 +)~(=2*#also possible)
    print(x)  # spausdina antrąkart # HIDE(print)

def test_gap(_a=7):
    x = _a
    print(x)
    x = x + 11  # HIDE(+)
    print(x) 

def test_gap_with_spec_chars(_a=7):
    x = _a
    print("big ~\# part") # HIDE(() HIDE(part")  


def test_gap_with_spec_chars_HIDEEXACT_tilde_and_backslash():
    print("~\ # stuff") # HIDEEXACT(\~\ #)
    print("~\# stuff") # HIDEEXACT(\~\#)
    print("~\# stuff") # HIDEEXACT(\#)
    print("~\# stuff") # HIDEEXACT(#)
    print("~\# stuff") # HIDEEXACT(\~)
    print("~\# stuff") # HIDEEXACT(\)
    
def test_gap_with_spec_chars_dict(_a=7):
    x = _a
    d={x:4} # HIDE(d=)
    print(d)

def test_gap_with_spec_chars_dict_hide_dict(_a=7):
    x = _a
    d={x:4} # HIDE({)
    print(d)

def test_gap_with_spec_chars_hide_comment_sign(_a=7):
    x = _a
    print(x) # bla bla HIDE( (x) # ) ~%20%(x)# gaunate tik 20%, nes lieka sintaksės klaida...


    
def test_gap_HIDEREGEXP(_a=7):
    x = _a + 5 # HIDEREGEXP(\d *\+)
    print(x)

# ****************************************
__print_category('Bandymai', sub_path="FillGaps", _type="CLOZE")

test_gap()
test_gaps()
test_gap_with_alternatives()
test_gap_with_baseword()
test_gap_with_partof_baseword()
test_gap_with_spec_chars()
test_gap_with_spec_chars_dict()
test_gap_with_spec_chars_dict_hide_dict()
test_gap_with_spec_chars_HIDEEXACT_tilde_and_backslash()
test_gap_with_spec_chars_hide_comment_sign()
test_gap_HIDEREGEXP()
#~ __rand_questions(  test_gaps, [(1, 20)], 5 , sub_path='FillGaps/Bandymai', _type="CLOZE")
